# SPDX-FileCopyrightText:2022-2024 深圳市同心圆网络有限公司
# SPDX-License-Identifier: GPL-3.0-only

tags:
  - connection
summary: 连接redis数据库
description: 连接redis数据库
operationId: "{{ uniqueOpId() }}"
requestBody:
  content:
    application/json:
      schema:
        type: object
        properties:
          token:
            type: string
            description: 访问令牌
          name:
            type: string
            description: 显示名称
          hosts:
            type: array
            items: 
              type: string
            description: 服务器地址
          db:
            type: integer
            description: 连接数据库中的DB id
          cluster:
            type: boolean
            description: 是否连接redis集群
          username:
            type: string
            description: redis账号
          password:
            type: string
            description: redis密码
responses:
  "200":
    description: 成功
    content:
      application/json:
        schema:
          type: string
  "500":
    description:  失败
    content:
      application/json:
        schema:
          $ref: "@schemas/errInfo.yml.njk"
